package com.xiaohai.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaohai.projo.Class;
import com.xiaohai.projo.Score;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaohai.projo.dto.ScoreDto;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaohai
 * @since 2024-02-24
 */
@Transactional
public interface ScoreService extends IService<Score> {

    /**
     * 根据教师id查询教师
     * @param id
     * @return
     */
    Long getByTeacherId(Integer id);

    Page<ScoreDto> myList(Integer currentPage, Integer pageSize, String studentName, String courseName, String teacherName ,String name,Integer identity,String account);

    /**
     * 根据id获取详情
     * @param id
     * @return
     */
    ScoreDto detail(String id);

    /**
     * 删除成绩
     * @param id
     * @return
     */
    boolean delete(Integer id);

    /**
     * 修改
     * @param score
     * @return
     */
    Boolean myUpdate(Score score);

    boolean add(Score score);

    /**
     * 批量新增
     * @param scores
     * @return
     */
    Boolean batchAdd(List<Score> scores);

    /**
     * 通过studentId判断是否有score
     * @param id
     * @return
     */
    Boolean isEmptyByStudentId(Integer id);

    /**
     * 获取考试名称列表
     * @return
     */
    List<String> getNameList();

    /**
     * excel导出
     * @return
     */
    List<ScoreDto> exportList(Integer identity,String account);
}
